import { createRouter, createWebHistory, type RouteRecordRaw } from "vue-router";
import Layout from "@/Layout/Layout.vue";
import Login from "@/views/Login.vue";
import Chat from "@/views/Chat.vue";

const routes: RouteRecordRaw[] = [
  { path: "/Login", component: Login },
  {
    path: "/",
    name: "Layout",
    component: Layout,
    redirect: "/Chat",
    children: [
      { path: "/Chat", name: "Chat", component: Chat },
    ],
  },
];

const router = createRouter({ history: createWebHistory(), routes, });
export default router;
